package WeeklyLog_Prototype_05;

import WeeklyLog_Prototype_05.Attachment.Attachment;
import WeeklyLog_Prototype_05.Entity.WeeklyLog;

import java.io.IOException;

public class WeeklyLogApplication {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        Attachment attachment = new Attachment("这是第一个附件");
        WeeklyLog weeklyLog = new WeeklyLog("周报1", "这是第一个周报", "2025-7-11", attachment);

        WeeklyLog clonedLog = (WeeklyLog) weeklyLog.deepClone();

        boolean isLogSame = weeklyLog == clonedLog;

        boolean isAttachmentSame = weeklyLog.getAttachment() == clonedLog.getAttachment();

        System.out.println("周报是否相同？ " + isLogSame);
        System.out.println("附件是否相同？ " + isAttachmentSame);
        System.out.println("原始周报内容：" + weeklyLog);
        System.out.println("克隆周报内容：" + clonedLog);

    }
}
